/**
 * 促销相关API
 */
import request from '@/utils/request.js';

export default {


    /**
     * 获取当前拼团活动的未成团的会员
     */
    getPromotionGroupMember(pintuanId) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /** 获取拼团列表 */
    getAssembleList(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 获取积分商城分类
     */
    getPointsCategory() {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 获取积分商城商品
     * @param params
     */
    getPointsGoods(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },
    /**
     * 获取积分商城商品详情
     * @param params
     */
    getPointsGoodsDetail(id) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },


    /**
     * 获取限时抢购时间线 当天限时抢购信息
     */
    getSeckillTimeLine() {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 获取限时抢购商品 获取某个时刻的限时抢购商品信息
     * @param params
     */
    getSeckillTimeGoods(timeline) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    // *********************************************   优惠券 *********************************************************//

    /**
     * 获取全部优惠券
     * @param params
     */
    getAllCoupons(params) {
        return request(`/api/member/promotion/coupon/canReceiveList`, params, "GET");
    },

    /**
     * 分页获取砍价商品
     * @param params
     */
    getBargainList(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 分页获取砍价商品
     * @param params
     */
    getBargainDetail(id) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 获取砍价活动
     * @param params
     */
    getBargainActivity(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 发起砍价活动
     * @param params
     */
    openBargain(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 分页获取砍价活动-帮砍记录
     */
    getBargainLog(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },


    /**
     * 分页获取砍价活动-帮砍记录
     */
    helpBargain(kanJiaActivityId) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    },

    /**
     * 分页获取已参与的砍价活动
     */
    getMineBargainLog(params) {
        return request(`/open/cms/agreement/1/` + code, {}, "GET");
    }
}




